<?php
/**
 * 支付日志
 * User: yuanxuncheng
 * Date: 2016-12-21
 * Time: 22:39
 */

namespace app\api\model;

use think\Model;
use think\Db;

class PayLog extends Model
{
    //set talbename
    protected $table = 'pay_log';
    //set primary key
    protected $pk = 'log_id';

    /**
     * @desc 增加支付日志
     * @param $param
     * @return false|int
     */
    public function addPayLog($param)
    {
        return $this->save($param);
    }

    /**
     * @desc 获取支付日志
     * @param $act_id
     * @return false|\PDOStatement|string|\think\Collection
     */
    public function getPayLog($log_id)
    {
        $conds = array(
            'log_id' => $log_id,
        );
        $field = '*';
        return Db::table($this->table)->where($conds)->field($field)->select();
    }
}
